#ifndef USUAL_HPP_INCLUDED
#define USUAL_HPP_INCLUDED

#include <string>
#include <iostream>
#include <list>
#include <vector>
#include <Magick++.h>

using std::vector;
using std::list;
using std::string;
using std::ostream;



class Usual
{



    private:
        int matrix_size;
        double **matrix;
        string read_path;
        string write_path;
        list<string> pictures_string;
        list<Magick::Image*> pictures;
        double readTime;
        double writeTime;
        double processTime;
        double totalTime;

        double read_inputFile(const char* fileName);
    public:
        Usual(const char* filename);
        Usual(){};
        Usual(const Usual& u);
        ~Usual();
        /*
        Usual(int mat_s, double **mat, const string& r_path, const string& w_path):
            matrix_size(mat_s), matrix(mat), read_path(r_path), write_path(w_path){}
        //*/
        // ajoute une image à l'objet et la charge en mémoire
        Usual& operator+ (const string&);
        list<string>* get_picture_list(void){return &pictures_string;}
        void set_picture_list(list<string>& l){pictures_string = l;}
        string& next_picture_string(void);

        Magick::Image& next_picture(void);
        Magick::Image pop_picture(void);
        int get_matrix_size(void) { return matrix_size; }

        inline double getReadTime(void) { return readTime;};

        inline double getWriteTime(void) { return writeTime;};
        inline void setWriteTime(double t) { writeTime = t;};
        inline void addWriteTime(double t) { writeTime += t;};

        inline double getProcessTime(void) { return processTime;};
        inline void setProcessTime(double t) { processTime = t;};
        inline void addProcessTime(double t) { processTime += t;};

        inline double getTotalTime(void) {return totalTime = processTime + writeTime + readTime;};



        double get_matrix(const int x, const int y) { return matrix[x][y]; }
        double** get_matrix() {return matrix;}
        string& get_write_path(void) { return write_path; }
        bool is_next(void) { return (pictures.size() != 0);}
        void pop_picture_string(void);

/*
        void set_matrix(const double**);
        void set_read_path(const string& path);
        void set_write_path(const string& path);
//*/

	  friend ostream& operator<<(ostream& o, Usual& a);


};

#endif // USUAL_HPP_INCLUDED
